using System;
using System.Linq.Expressions;

namespace Avanzis.QueryBuilder.Fluent
{
    /// <summary>
    /// 
    /// </summary>
    public class QueryParameter<T> : QueryParameter where T : class
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="parameterValue"></param>
        public QueryParameter(Expression<Func<T, object>> expression, object parameterValue)
        {
            this.ParameterName = FluentHelper.GetParameterName(expression);
            this.Value = parameterValue;
        }
    }
}